package com.dyypdadmin.service.impl;

import com.dyypdadmin.dao.ServiceRecordsDao;
import com.dyypdadmin.pojo.ServiceRecords;
import com.dyypdadmin.service.ServiceRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class ServiceRecordsServiceImpl implements ServiceRecordsService {
    @Autowired
    private ServiceRecordsDao serviceRecordsDao;
    @Override
    public int addServiceRecord(int user_id, String order_number, int pet_id, int appointment_id, int project_id,  int status,int is_medical) {
        return serviceRecordsDao.addServiceRecord(user_id, order_number, pet_id, appointment_id, project_id, status,is_medical);
    }

    @Override
    public List<ServiceRecords> getAll() {
        return serviceRecordsDao.selectList(null);
    }

    @Override
    public int updateServiceRecordById(Integer record_id) {
        return serviceRecordsDao.updateServiceRecordById(record_id);
    }

    @Override
    public int getServiceRecordsCounts() {
        return serviceRecordsDao.getServiceRecordsCounts();
    }
}
